# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-osprofiler
pkgver=3.4.3
_commit=32863011fe90aa283425b6347123c38e5c251ac3
pkgrel=4
pkgdesc="OpenStack Profiler Library"
arch=('any')
url="https://docs.openstack.org/osprofiler/latest/"
license=('Apache')
depends=('python-netaddr' 'python-oslo-concurrency' 'python-oslo-serialization' 'python-oslo-utils'
         'python-prettytable' 'python-requests' 'python-webob')
makedepends=('git' 'python-setuptools')
checkdepends=('python-ddt' 'python-stestr' 'python-testtools' 'python-docutils' 'python-pymongo'
              'python-elasticsearch' 'python-redis')
source=("git+https://github.com/openstack/osprofiler.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd osprofiler
  python setup.py build
}

check() {
  cd osprofiler
  stestr run --exclude-regex 'osprofiler.tests.unit.drivers.test_jaeger'
}

package() {
  cd osprofiler
  python setup.py install --root="$pkgdir" --optimize=1
}
